<template>
	<view class="app">
		<view class="header">
			<view class="order-price"><text>¥</text>19.9</view>
			<view class="header-text-1">订单提交成功！请尽快完成支付</view>
			<view class="header-text-2">请在<text>24:00:00</text>内完成支付，超时将取消订单！</view>
		</view>
		<view class="pay-type">
			<view class="pay-item" v-for="(item,index) in payList" @click="changePayType(index)">
				<view class="pay-item-left">
					<image mode="widthFix" class='pay-icon' :src="'../../static/'+item.img"></image>
					{{item.name}}
				</view>
				<image v-if="payType==index" class="check-icon" src="../../static/checked.png"></image>
				<image v-else class="check-icon" src="../../static/no-check.png"></image>
			</view>
		</view>
		<view class="footer">
			<view class="zfann" @click="zhifwanc">确认支付</view>
		</view>
	</view>
</template>
<script>
export default{
	data(){
		return {
			payList:[
				{name:"微信支付",img:"wepay.png"},
				{name:"银联支付",img:"pay-1.png"},
				{name:"线下支付",img:"pay-2.png"},
				{name:"支付宝支付",img:"alipay.png"},
			],
			payType:0
		}
	},
	methods:{
		changePayType(type){
			this.payType=type;
		},
		zhifwanc(){
			uni.navigateTo({
				url:'../payResult/payResult'
			})
		}
	}
}
</script>
<style scoped lang="scss">
	.header {
		height: 320rpx;
		background-color: #f4f4f4;
		position: relative;
		text-align: center;
		padding-top: 80rpx;

		.order-center {
			font-size: 26rpx;
			color: #111;
			position: absolute;
			top: 20rpx;
			right: 30rpx;
		}

		.order-price {
			font-size: 40rpx;
			color: #ff0000;
			margin-bottom: 44rpx;
			font-weight: bold;

			text {
				font-size: 0.7em;
			}
		}

		.header-text-1 {
			color: #969696;
			font-size: 26rpx;
			margin-bottom: 19rpx;
		}

		.header-text-2 {
			color: #969696;
			font-size: 26rpx;

			text {
				color: #ff0000;
				padding: 0 10rpx;
			}
		}
	}
	.pay-item{
		height: 102rpx;
		padding: 0 32rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		.pay-item-left{
			display: flex;
			align-items: center;
			font-size: 26rpx;
			color: #222222;
			.pay-icon{
				width: 42rpx;
				margin-right: 20rpx;
			}
		}
		.check-icon{
			width: 32rpx;
			height: 32rpx;
		}
	}
	.footer{
		display: flex;
		position: fixed;
		align-items: center;
		justify-content: center;
		bottom: 30rpx;
		width: 100%;
		.zfann{
			width: 670rpx;
			height: 80rpx;
			background: #ff007f;
			display:flex;
			justify-content: center;
			align-items: center;
			color: #ffffff;
			border-radius: 40rpx;
		}
	}
</style>
